Event-Driven FRP
نویسندگان
چکیده
Functional Reactive Programming (FRP) is a high-level declarative language for programming reactive systems. Previous work on FRP has demonstrated its utility in a wide range of application domains, including animation, graphical user interfaces, and robotics. FRP has an elegant continuous-time denotational semantics. However, it guarantees no bounds on execution time or space, thus making it unsuitable for many embedded real-time applications. To alleviate this problem, we recently developed Real-Time FRP (RT-FRP), whose operational semantics permits us to formally guarantee bounds on both execution time and space. In this paper we present a formally verifiable compilation strategy from a new language based on RT-FRP into imperative code. The new language, called Event-Driven FRP (E-FRP), is more tuned to the paradigm of having multiple external events. While it is smaller than RT-FRP, it features a key construct that allows us to compile the language into efficient code. We have used this language and its compiler to generate code for a small robot controller that runs on a PIC16C66 micro-controller. Because the formal specification of compilation was crafted more for clarity and for technical convenience, we describe an implementation that produces more efficient code.
منابع مشابه
Functional Reactive Programming with Liveness Guarantees As relations are to set-valued functions, so event sources are to behaviours
Functional Reactive Programming (FRP) is an approach to the development of reactive systems which provides a pure functional interface, but which may be implemented as an abstraction of an imperative event-driven layer. FRP systems typically provide a model of behaviours (total time-indexed values, implemented as pull systems) and event sources (partial time-indexed values, implemented as push ...
متن کاملFrappé: Functional Reactive Programming in Java
Functional Reactive Programming (FRP) is a declarative programming model for constructing interactive applications based on a continuous model of time. FRP programs are described in terms of behaviors (continuous, timevarying, reactive values), and events (conditions that occur at discrete points in time). This paper presents Frappé, an implementation of FRP in the Java progamming language. The...
متن کاملFunctional reactive programming as a hybrid system framework
In previous work we presented Functional Reactive Programming (FRP), a general framework for designing hybrid systems and developing domain-specific languages for related domains. FRP’s synchronous dataflow features, like event driven switching, supported by higherorder lazy functional abstractions of Haskell allows rapid development of modular and reusable specifications. In this paper, we wil...
متن کاملE - FRP With Priorities ∗ ( Extended
E-FRP is declarative language for programming resourcebounded, event-driven systems. Its original high-level semantics requires that each event handler execute atomically. This facilitates reasoning about E-FRP programs, and therefore is a desirable feature of the language. However, the original compilation strategy requires that each handler complete execution before another event can occur. T...
متن کاملEvent-driven and Attribute-driven Robustness
Over five decades have passed since the first wave of robust optimization studies conducted by Soyster and Falk. It is outstanding that real-life applications of robust optimization are still swept aside; there is much more potential for investigating the exact nature of uncertainties to obtain intelligent robust models. For this purpose, in this study, we investigate a more refined description...
متن کامل